<?php
// +----------------------------------------------------------------------
// | Yzncms [ 御宅男工作室 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2018 http://yzncms.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: 御宅男 <530765310@qq.com>
// +----------------------------------------------------------------------

// +----------------------------------------------------------------------
// | 前台配置模型
// +----------------------------------------------------------------------
namespace app\common\model;

use think\Model;

class KuaiShouConfigModel extends Model
{
    protected $table = 'ks_kuai_shou_config';
    // 自动写入时间戳
    protected $autoWriteTimestamp = false;

    const NAME = 'name';
    const VALUE = 'value';
    const CREATE_TIME = 'create_time';
    const UPDATE_TIME = 'update_time';

    /**
     * 获取
     * @param $key
     * @return mixed
     */
    public function getValueByKey($key)
    {
        return $this->where(self::NAME, $key)->value(self::VALUE);
    }
}
